#include <iostream>
#include <climits>

using namespace std;

void exercise_1();
void exercise_2();
void exercise_3();
void exercise_4();
void exercise_5();
void exercise_6();
void exercise_7();


int main(){
    exercise_7();
    return 0;
}

void exercise_1(){
    const int foot = 12;
    cout << "Enter ur inch per height:_____\b\b\b\b\b";
    int inch;
    cin >> inch;
    int fut = inch / foot;
    int matis = inch % foot;
    cout << "U " << fut << " foot " << matis << " inch cuck old" << endl;
}

void exercise_2(){
    int foot;
    int inch;
    int pound;
    int bmi;
    const int fut (12);
    const double metr (0.0254);
    const double kg (2.2);

    cout << "How foot ";
    cin >> foot;
    cout << "and inch ";
    cin >> inch;
    cout << endl;
    cout << "How weight ";
    cin >> pound;
    cout << endl;

    double height = double(foot * fut + inch) * metr;
    double weight = double(pound) / kg;

    bmi = int(weight / (height * height));

    cout << "Ur BMI is " << bmi << "." << endl;
}

void exercise_3(){
    int deg, min, sec;
    const float cons (60.0);
    cout.setf(ios_base::fixed, ios_base::floatfield);
    cout.precision(4);

    cout << "Enter a latitude in degrees, minutes and seconds: " << endl;
    cout << "First, enter the degrees: ";
    cin >> deg;
    cout << "Next, enter the minutes of arc: ";
    cin >> min;
    cout << "Finally, enter the seconds of arc: ";
    cin >> sec;
    cout << endl;
    float sum = float(deg + min/cons + sec/(cons * cons));
    cout << deg << " degrees, " << min << " minutes, " << sec << " seconds = " << sum << endl;
}

void exercise_4(){
    long sec;
    const double all_day (24.0);
    const double sec_in_hour (3600.0);
    const double sixteen (60.0);
    cout << "Enter the number of second: ";
    cin >> sec;

    double day = sec / (all_day * sec_in_hour);
    double hour = (day - int(day)) * all_day;
    double minut = (hour - int(hour)) * sixteen;
    double second = (minut - int(minut)) * sixteen;


    cout << int(day) << " days, " << int(hour) << " hour, " << int(minut) << " minutes, " << second << " seconds." << endl;
}

void exercise_5(){
    long long whole_world;
    long this_country;
    cout.setf(ios_base::fixed, ios_base::floatfield);
    cout.precision(5);

    cout << "Enter the world's population: ";
    cin >> whole_world;
    cout << "Enter the population of the Vatikan: ";
    cin >> this_country;
    cout << endl;

    cout << "The population of the Vatikan is " << 100 * (double(this_country) / double(whole_world)) << " of the world population." << endl;
}

void exercise_6(){
    int gaz, oddo;

    cout.setf(ios_base::fixed, ios_base::floatfield);
    cout.precision(4);

    cout << "How long is a shlong: ";
    cin >> oddo;
    cout << "How much is gaz left: ";
    cin >> gaz;

    cout << "Consumption gaz per 100 km is: " << double(gaz) / (double(oddo) / 100.0) << " l/100 km." << endl;
}

void exercise_7(){
    double eu_gaz;
    double us_gaz;

    const double hun_km (62.14);
    const double one_gal (3.875);

    cout.setf(ios_base::fixed, ios_base::floatfield);
    cout.precision(4);

    cout << "Enter consumption EU gaz: ";
    cin >> eu_gaz;

    us_gaz = hun_km / ((1 / one_gal) * eu_gaz);

    cout << "EU consumption of " << eu_gaz << " l/100km " << " againt US consumption " << us_gaz << " mile per gal." << endl;
}
